package c.e.a.a.f.p.h;

import com.google.auto.value.AutoValue;
import com.google.auto.value.AutoValue.Builder;
import java.util.Collections;
import java.util.Map;
import java.util.Objects;
import java.util.Set;

@AutoValue
/* compiled from: SchedulerConfig */
public abstract class f {

    @AutoValue
    /* compiled from: SchedulerConfig */
    public static abstract class a {

        @Builder
        /* compiled from: SchedulerConfig */
        public static abstract class a {
            public abstract a a();

            public abstract a b(long j);

            public abstract a c(long j);
        }

        public static a a() {
            c.e.a.a.f.p.h.c.b bVar = new c.e.a.a.f.p.h.c.b();
            Set emptySet = Collections.emptySet();
            Objects.requireNonNull(emptySet, "Null flags");
            bVar.c = emptySet;
            return bVar;
        }

        public abstract long b();

        public abstract Set<b> c();

        public abstract long d();
    }

    /* compiled from: SchedulerConfig */
    public enum b {
        NETWORK_UNMETERED,
        DEVICE_IDLE,
        DEVICE_CHARGING
    }

    public abstract c.e.a.a.f.r.a a();

    public long b(c.e.a.a.b bVar, long j, int i) {
        j -= a().a();
        a aVar = (a) c().get(bVar);
        long b = aVar.b();
        i--;
        return Math.min(Math.max((long) ((Math.pow(3.0d, (double) i) * ((double) b)) * Math.max(1.0d, Math.log(10000.0d) / Math.log((double) ((b > 1 ? b : 2) * ((long) i))))), j), aVar.d());
    }

    public abstract Map<c.e.a.a.b, a> c();
}
